// Copyright (c) 2024, lanlian and contributors
// For license information, please see license.txt

frappe.query_reports["EMS Fault Analytics"] = {
	"filters": [
		{
			fieldname: "tree_type",
			label: __("Tree Type"),
			fieldtype: "Select",
			options: ["EMS Equipment Card", "EMS Equipment Category", "User Department", "EMS Fault Effect"],
			default: "EMS Equipment Card",
			reqd: 1,
		},
		{
			fieldname: "from_date",
			label: __("From Date"),
			fieldtype: "Date",
			default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
			reqd: 1,
		},
		// {
		// 	fieldname: "to_date",
		// 	label: __("To Date"),
		// 	fieldtype: "Date",
		// 	default: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
		// 	reqd: 1,
		// },
		{
			fieldname: "company",
			label: __("Company"),
			fieldtype: "Link",
			options: "Company",
			default: frappe.defaults.get_user_default("Company"),
			reqd: 1,
		},
	]
};
